%% Pattern matching test.
%% 

-include_lib("ect/include/ect.hrl").

-class(pattern3).

-import_class(pattern1).
-import_class(pattern2).

-superclass(pattern2).
-methods([check/1]).

-export([dotest/0]).

check(This1 = #pattern1{c = [#pattern1{b = {x, S}}, zapf]}) when S =:= s ->
    This1.

dotest() ->
    X = #pattern3{a = "p", b = "a", c = [#pattern2{b = {x, s}}, zapf]},
    {X}:check(),
    pass.
